This Python library includes functions for xor based encryption as well as a somewhat decent custom hash function.